import h from './mysnabbdom/h.js';
import patch from './mysnabbdom/patch.js';

let  container = document.createElement('div');
container.innerText="hello";
// document.body.appendChild(container);
console.log(container);


// var myvnode1 = h('div',{},[
// 	h("p",{},"测试01"),
// 	h("p",{},"测试02"),
// 	h("p",{},"测试03"),
// 	h("p",{},[
// 			h("span",{},"测试span01"),
// 			h("span",{},"测试span02"),
// 		]),
// 	])

// var myvnode1 = h('div',{},11);

// var myvnode1 = h('div',{},h("p",{},"测试01"))

var myvnode1 = h('div',{key:"key1"},[
	h("p",{key:"B"},"测试011"),
	h("p",{key:"A"},"测试022"),
	h("p",{key:"C"},"测试033"),
	h("p",{key:"D"},"测试044")
	])

var myvnode2 = h('div',{key:"key1"},[
	h("p",{key:"A"},"测试01"),
	h("p",{key:"B"},"测试02"),
	h("p",{key:"C"},"测试03"),
	h("p",{key:"D"},"测试04")
	])

// const container = document.getElementById('container');
// var fn =function(){
// 	patch(container,myvnode1);
// 	console.log('调用patch方法后的container是：',container);
// }
// setTimeout(fn,5000)


patch(myvnode1,myvnode2);

